<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
	/*  无参无返回值*/
	function fn1(){
		alert("fn1执行");
	}
	//调用
	//fn1();
	/* 有参无返回值 */
	function fn2(name,age){
		alert(name+":"+age);
	}
	//fn2("刘德华",25);
	function fn3(){
		return "abc";
	}
	//var s=fn3();
	//	alert(s);
	function fn4(x,y){
		return x*y;
	}
	//var result=fn4(3,7);
	//alert(result);
	
	var fun5= function(){
		return "fun5执行";
	}
	//alert(fun5());
	var fn6=new Function("name","age","alert(name+':'+age)");
	fn6("张飞",18);
</script>

</body>
</html>